version 14

log using figure1_code.log, replace
#delimit ;
set more off ;

*************************************************************************;
*  File-Name:	figure1_code.do						*;
*  Date Run:	Nov 7, 2016						*;
*    		March 9, 2017 - Rerun for Replication Dataset		*;
*  Author:	JN/SL  							*;
*  Purpose:	Produce Figure 1 of Linn and Nagler, APR 2017		*;
*									*;
*  Data In:	econdata_2013_geoW_D.dta				*;
*  Out File:	figure1_code.log					*;
*  Data Out:    none							*;
*  Graphs:	QuintFamMeansNoTitle_mono.pdf				*;
*		QuintFamMeansNoTitle_Dv2.pdf				*;
*									*;
* Prev File: :	describe_econdata_2012_D_Graphs_v4.do		       	*;
* Machine:  	nagler-imac						*;
* Status:    	Replication Code					*;
*************************************************************************;

*************************************************************************;
* Read in all the family income data					*;
*************************************************************************;

* use ~/Dropbox/EconvoteDrop/Data/Make_econ_quintiles/econdata_2013_geoW_D.dta *;

use econdata_2013_geoW_D_REP.dta;

tsset qdate;
summ;
describe, fullnames;


*************************************************************************;
* Some simple line graphs to illustrate the correlations		*;
* of income of different quintiles.					*;
* This produces Figure 1 from Linn and Nagler, APR 2017			*;
*************************************************************************;


**Repeat previous graph without titles for tex file	*;
**AND, mono rather than color				*;
twoway (tsline famq1mean famq2mean famq3mean
	famq4mean famq5mean, lpattern(solid dash dot dash_dot longdash)), 
	title() ttitle(Year)
	subtitle() 
	legend(order(1 "Bottom Quintile" 2 "Second Quintile" 3 "Third Quintile" 4 "Fourth Quintile" 5 "Top Quintile"))
	ytitle(2012 Dollars) name(QuintFamMeanNoTitle, replace)
	scheme(s1mono); 

	graph export "QuintFamMeanNoTitle_Dv2.pdf", replace;

log close;

exit;

